#include "common.h"

void init_iwdg(void)
{
    RCC->CSR |= (1 << 0);
    // Delay_1ms(3000);
    IWDG->KR  = 0x5555;
    IWDG->PR  = 4;
    IWDG->RLR = 0xfff;
    IWDG->KR  = 0xCCCC;
}

void feed_iwdg(void)
{
    IWDG->KR = 0xaaaa;
}
